import { _decorator, Component, Node } from 'cc';
import { BaseManager } from './BaseManager';
import { BasePlatform } from '../platforms/BasePlatform';
import { BYTEDANCE, HTML5, WECHAT, WECHAT_MINI_PROGRAM } from 'cc/env';
import { TT } from '../platforms/minis/TT';
import { _wheel } from '../Main';
import { Web } from '../platforms/minis/Web';
import { WX } from '../platforms/minis/WX';
const { ccclass, property } = _decorator;

@ccclass('PlatformManager')
export class PlatformManager extends BaseManager {

    managerName: string = '平台管理器'

    platform: BasePlatform = null

    init(): void {
        if (HTML5) {
            this.platform = new Web('', '', [])
        }
        if (BYTEDANCE) {
            this.platform = new TT('ttaf35d988300418fa02', '', ['440e0ike4g53j6d1e2'])
        }
        if (WECHAT || WECHAT_MINI_PROGRAM) {
            this.platform = new WX('wx43a8fef7b7d57221', '', [])
        }
        this.platform.init()
    }
}


